package config

type WebConfig struct {
	Name   string      `mapstructure:"name" json:"name"`
	Host   string      `mapstructure:"host" json:"host"`
	Tags   []string    `mapstructure:"tags" json:"tags"`
	Port   int         `mapstructure:"port" json:"port"`
	Srv    SrvConfig   `mapstructure:"order_srv" json:"order_srv"`
	JWT    JWTConfig   `mapstructure:"jwt" json:"jwt"`
	Redis  RedisConfig `mapstructure:"redis" json:"redis"`
	Consul Consul      `mapstructure:"consul" json:"consul"`

	Goods  SrvConfig    `mapstructure:"goods_srv" json:"goods_srv"`
	Inv    SrvConfig    `mapstructure:"inventory_srv" json:"inventory_srv"`
	Alipay AlipayConfig `mapstructure:"alipay" json:"alipay"`
	Jaeger Jaeger      `mapstructure:"jaeger" json:"jaeger"`
}

type Jaeger struct {
	Name string `mapstructure:"name" json:"name"`
	Host string `mapstructure:"host" json:"host"`
	Port int    `mapstructure:"port" json:"port"`
}

type SrvConfig struct {
	Name string `mapstructure:"name" json:"name"`
}

type JWTConfig struct {
	SignKey string `mapstructure:"key" json:"key"`
}

type RedisConfig struct {
	HOST string `mapstructure:"host" json:"host"`
	Port int    `mapstructure:"port" json:"port"`
}

type Consul struct {
	Host string `mapstructure:"host" json:"host"`
	Port int    `mapstructure:"port" json:"port"`
}

type Nacos struct {
	Host      string `mapstructure:"host"`
	Port      uint64 `mapstructure:"port"`
	Namespace string `mapstructure:"namespace"`
	User      string `mapstructure:"user"`
	Password  string `mapstructure:"password"`
	DataId    string `mapstructure:"dataid"`
	Group     string `mapstructure:"group"`
}

type AlipayConfig struct {
	AppID        string `mapstructure:"app_id" json:"app_id"`
	PrivateKey   string `mapstructure:"private_key" json:"private_key"`
	AliPublicKey string `mapstructure:"ali_public_key" json:"ali_public_key"`
	NotifyURL    string `mapstructure:"notify_url" json:"notify_url"`
	ReturnURL    string `mapstructure:"return_url" json:"return_url"`
}
